<script type="text/javascript">

    $(document).ready(function () {
        $('.category').click(function () {
            $.ajax({
                url: "<%= filter_products_url %>",
                data: {
                    category: $(this).data('id')
                },
                type: "POST",
                dataType : "script"
            });
        });

        $('.brand').click(function () {
            $.ajax({
                url: "<%= filter_products_url %>",
                data: {
                    brand: $(this).data('id')
                },
                type: "POST",
                dataType : "script"
            });
        });
    });
</script>
